package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.CustomerAddress;
import com.bwie.service.CustomerAddressService;
import com.bwie.mapper.CustomerAddressMapper;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Yoo19
* @description 针对表【customer_address】的数据库操作Service实现
* @createDate 2025-07-11 10:08:31
*/
@Service
public class CustomerAddressServiceImpl extends ServiceImpl<CustomerAddressMapper, CustomerAddress>
    implements CustomerAddressService{
    @Autowired
    private CustomerAddressMapper customerAddressMapper;
    @Override
    public R getAddress(Integer customerId) {
        List<CustomerAddress> customerAddressList = customerAddressMapper.selectList(new LambdaQueryWrapper<CustomerAddress>().eq(CustomerAddress::getCustomerId, customerId));

        return R.OK(customerAddressList);
    }
}




